// declare variale in Logo State
int m_iMidX = SCREEN_W >> 1;
int m_iMidY = SCREEN_H >> 1;

Image imgCh;

//count time for changing state
long m_lNextLevelStartTime = 0;
long m_lNextLevelCurrentTime = 0;
long lNextLevelTime = 5000; 


void UpdateNextLevel(int mode)
{
	if (mode == UpdateType.UPDATE)
	{
		try
		{
			m_lNextLevelCurrentTime = System.currentTimeMillis();		
		}
		catch(Exception e)
		{
		}
		if ((m_lNextLevelCurrentTime - m_lNextLevelStartTime) > lNextLevelTime)
		{
			SwitchState(GameState.InGame);
		}
	} 
	if (mode == UpdateType.PAINT)
	{
		s_g.setColor(c_black);
		s_g.fillRect(0, 0, SCREEN_W, SCREEN_H);
		// if (m_imgOptionBG != null)
		// {
			// s_g.drawImage(m_imgOptionBG, 0, 0, Graphics.TOP|Graphics.LEFT);
		// }
		 if(imgCh != null)
			s_g.drawImage(imgCh, m_iMidX-20, m_iMidY, Graphics.HCENTER | Graphics.VCENTER);
			// s_g.setColor(c_white);			
			// s_g.drawString("  X   " + s_MainCharacter.s_iLife,  m_iMidX, m_iMidY, Graphics.TOP | Graphics.LEFT);
			// s_g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_LARGE));
			// s_g.drawString("LEVEL   "+s_iLevel,  m_iMidX-25, m_iMidY-70, Graphics.TOP | Graphics.LEFT);
			fonts[0].drawString("  X   " + s_MainCharacter.s_iLife,(SCREEN_W>>1)+4,m_iMidY,Graphics.HCENTER,s_g);
			fonts[1].drawString("LEVEL   "+s_iLevel,SCREEN_W>>1,70,Graphics.HCENTER,s_g);
	}
	if (mode == UpdateType.CTOR)
	{
		try
		{
			imgCh = Image.createImage("/character.png");	
            //m_imgOptionBG = Image.createImage("/bg_pink_02.png");			
			m_lNextLevelStartTime = System.currentTimeMillis();
		}
		catch (Exception e)
		{
			System.out.println("e::::::::::::: " + e.getMessage());
		}
	}
	if (mode == UpdateType.DTOR)
	{
	//m_imgOptionBG=null;
	}
}
